#!/bin/sh
# URI="http://dev.epiid.com/api"
URI="http://www.epiid.com/api"
# URI="http://54.255.126.69/api"
# URI="http://127.0.0.1:3501/api"
EMAIL="paikia@gmail.com"

echo "PING"
curl $URI
echo "\nSignUp"
curl -X POST -d "user[email]=p.aikia@gmail.com&user[password]=12341234" ${URI}/signup
echo "\nLogin"
curl -X POST -d "user[email]=paikia@gmail.com&user[password]=12345678" ${URI}/login

TOKEN="kxmepCgWjfB-rUVKmjzs"
echo "\nPutData"
curl -X POST -d "token=${TOKEN}&key=1&value=123123" ${URI}/putdata
echo "\nGetData"
curl -X POST -d "token=${TOKEN}&key=1" ${URI}/getdata

echo "\nPutData"
curl -X POST -d "token=${TOKEN}&key=1&value=Data2" ${URI}/putdata
echo "\nGetData"
curl -X POST -d "token=${TOKEN}&key=1" ${URI}/getdata

#Forget Password
echo "\nForget Password"
curl -X POST -d "user[email]=${EMAIL}" ${URI}/forget_password

#Server Private API
echo "\nPrivate API"
curl -X POST -d "usertoken=${TOKEN}" ${URI}/private/usertoken
